package com.music.biz.imp;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.music.biz.OrderDetailsBiz;
import com.music.dao.OrderDetailsDao;
import com.music.entity.OrderDetail;

@Service("orderDetailsBiz")
public class OrderDetailsBizImpl implements OrderDetailsBiz {

	@Autowired
	private OrderDetailsDao orderDetailsDao;

	public void setOrderDetailsDao(OrderDetailsDao orderDetailsDao) {
		this.orderDetailsDao = orderDetailsDao;
	}

	@Transactional(propagation = Propagation.REQUIRED)
	public void addOrderDetail(OrderDetail orderDetail) {
		orderDetailsDao.addOrderDetail(orderDetail);

	}

	public List<OrderDetail> getoDetailsById(int id) {
		// TODO Auto-generated method stub
		return orderDetailsDao.getoDetailsById(id);
	}

}
